package com.example.seckill.service;

import com.example.seckill.pojo.SeckillGoods;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface SeckillGoodsService {

    /***
     * SeckillGoods多条件分页查询
     * @param seckillGoods SeckillGoods
     * @param page 当前页
     * @param size 每页显示多少条
     * @return PageInfo<SeckillGoods>
     */
    PageInfo<SeckillGoods> findPage(SeckillGoods seckillGoods, int page, int size);

    /***
     * SeckillGoods分页查询
     * @param page 当前页
     * @param size 每页显示多少条
     * @return PageInfo<SeckillGoods>
     */
    PageInfo<SeckillGoods> findPage(int page, int size);

    /***
     * SeckillGoods多条件搜索方法
     * @param seckillGoods SeckillGoods
     * @return List<SeckillGoods>
     */
    List<SeckillGoods> findList(SeckillGoods seckillGoods);

    /***
     * 删除SeckillGoods
     * @param id ID
     */
    void delete(Long id);

    /***
     * 修改SeckillGoods数据
     * @param seckillGoods SeckillGoods
     */
    void update(SeckillGoods seckillGoods);

    /***
     * 新增SeckillGoods
     * @param seckillGoods SeckillGoods
     */
    void add(SeckillGoods seckillGoods);

    /**
     * 根据ID查询SeckillGoods
     * @param id ID
     * @return SeckillGoods
     */
     SeckillGoods findById(Long id);

    /***
     * 查询所有SeckillGoods
     * @return List<SeckillGoods>
     */
    List<SeckillGoods> findAll();


    List<SeckillGoods> list(String time);


    SeckillGoods one(String time, Long id);
}
